// 引入公共样式
require('../../assets/css/css.less')

// 引入css样式
require('./sporting.less');

// 引入矢量图样式
require("../../iconfont/iconfont.css");

window.onload = () => {
    // 获取dom
    const sec71 = document.querySelector('.sec71');
    const sec8 = document.querySelector('.sec8');
    const sec81 = document.querySelector('.sec81');
    const sec7 = document.querySelector('.sec7');
    const sec82 = document.querySelector('.sec82');
    const main = document.querySelector('.main');
    const container = document.querySelector('#container');
    const con=document.querySelector('.con')
    // 事件
    sec71.addEventListener('click', function () {
        sec7.style.display = 'none';
        sec8.style.display = 'flex';
    })

    sec81.addEventListener('click', function () {
        sec8.style.display = 'none';
        sec7.style.display = 'flex';
    })

    sec82.addEventListener('click', function () {
        main.style.display = 'none';
        con.style.display='block'
        
    })

    // 配置地图
    var map = new AMap.Map('container', {
        zoom: 11,//级别
        center: [104.05843, 30.53565],//中心点坐标
        viewMode: '3D'//使用3D视图
    });

    AMap.plugin('AMap.ToolBar', function () {//异步加载插件
        var toolbar = new AMap.ToolBar();
        map.addControl(toolbar);

    });


}